const fs = require('fs')
const https = require('https')

const express = require('express')
const config = require('./config/config')
const app = express()
app.use(express.static("public"))

const pem = fs.readFileSync("./config/server.key")
const crt = fs.readFileSync("./config/server.crt")
const options = {pem,crt}

const httpsServer = https.createServer(options,app)
httpsServer.listen(config.port)